package com.base.service.COUPON.impl;

import com.base.mapper.couponmapper.CouponCategoryMapper;
import com.base.po.voip_coupon.CouponCategory;
import com.base.po.voip_coupon.CouponCategoryExample;
import com.base.service.COUPON.CouponCategoryService;
import com.base.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("couponCategoryService")
public class CouponCategoryServiceImpl implements CouponCategoryService {
    @Autowired
    private CouponCategoryMapper couponCategoryMapper;

    @Override
    public int countByExample(CouponCategoryExample example) {
        return couponCategoryMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(CouponCategoryExample example) {
        return couponCategoryMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(String id) {
        return couponCategoryMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(CouponCategory record) {
        return couponCategoryMapper.insert(record);
    }

    @Override
    public int insertSelective(CouponCategory record) {
        return couponCategoryMapper.insertSelective(record);
    }

    @Override
    public List<CouponCategory> selectByExample(CouponCategoryExample example) {
        return couponCategoryMapper.selectByExample(example);
    }

    @Override
    public List<CouponCategory> selectAll(Page page, String parentId, Integer sort) {
        return couponCategoryMapper.selectAll(page, parentId, sort);
    }

    @Override
    public CouponCategory selectByPrimaryKey(String id) {
        return couponCategoryMapper.selectByPrimaryKey(id);
    }

    @Override
    public CouponCategory selectByCategory(String category) {
        return couponCategoryMapper.selectByCategory(category);
    }

    @Override
    public int updateByExampleSelective(CouponCategory record, CouponCategoryExample example) {
        return couponCategoryMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(CouponCategory record, CouponCategoryExample example) {
        return couponCategoryMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(CouponCategory record) {
        return couponCategoryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(CouponCategory record) {
        return couponCategoryMapper.updateByPrimaryKey(record);
    }

    @Override
    public int countAll(String parentId) {
        return couponCategoryMapper.countAll(parentId);
    }

    @Override
    public void clearAll() {
        couponCategoryMapper.clearAll();
    }
}
